<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	
	<body>
		<h3>人的属性firstname  lastname  age  fullname()</h3>
		<script>
			var person = {
				firstname:"张",
				lastname:"阵",
				age:18,
				fullname1:function(){
				return this.firstname + this.lastname;
				}
			}
			console.log(person);
			console.log(person.firstname);
			console.log(person.age);
			console.log(person.fullname1());
			
			//动态添加属性
			person.adress = "xianan";
			person.fullname2 = function(){
				return person.firstname+person.lastname+person.age;
			}
			console.log(person);
			console.log(person.fullname2());
			console.log(person.fullname1());
		</script>
	</body>
</html>
